Integrand size = 40, antiderivative size = 80 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} \left (a^2 B+2 b^2 B+4 a b C\right ) x+\frac {b^2 C \text {arctanh}(\sin (c+d x))}{d}+\frac {a (2 b B+a C) \sin (c+d x)}{d}+\frac {a^2 B \cos (c+d x) \sin (c+d x)}{2 d} \]
1/2*(B*a^2+2*B*b^2+4*C*a*b)*x+b^2*C*arctanh(sin(d*x+c))/d+a*(2*B*b+C*a)*si n(d*x+c)/d+1/2*a^2*B*cos(d*x+c)*sin(d*x+c)/d
Time = 0.74 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.50 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \left (a^2 B+2 b^2 B+4 a b C\right ) (c+d x)-4 b^2 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 b^2 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 a (2 b B+a C) \sin (c+d x)+a^2 B \sin (2 (c+d x))}{4 d} \]
(2*(a^2*B + 2*b^2*B + 4*a*b*C)*(c + d*x) - 4*b^2*C*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 4*b^2*C*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 4*a *(2*b*B + a*C)*Sin[c + d*x] + a^2*B*Sin[2*(c + d*x)])/(4*d)
Time = 0.72 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.05, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3042, 4560, 3042, 4512, 25, 3042, 4535, 24, 3042, 4533, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 4560 |
\(\displaystyle \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 (B+C \sec (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (B+C \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4512 |
\(\displaystyle \frac {a^2 B \sin (c+d x) \cos (c+d x)}{2 d}-\frac {1}{2} \int -\cos (c+d x) \left (2 b^2 C \sec ^2(c+d x)+\left (B a^2+4 b C a+2 b^2 B\right ) \sec (c+d x)+2 a (2 b B+a C)\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \int \cos (c+d x) \left (2 b^2 C \sec ^2(c+d x)+\left (B a^2+4 b C a+2 b^2 B\right ) \sec (c+d x)+2 a (2 b B+a C)\right )dx+\frac {a^2 B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {2 b^2 C \csc \left (c+d x+\frac {\pi }{2}\right )^2+\left (B a^2+4 b C a+2 b^2 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )+2 a (2 b B+a C)}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {a^2 B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle \frac {1}{2} \left (\left (a^2 B+4 a b C+2 b^2 B\right ) \int 1dx+\int \cos (c+d x) \left (2 b^2 C \sec ^2(c+d x)+2 a (2 b B+a C)\right )dx\right )+\frac {a^2 B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{2} \left (\int \cos (c+d x) \left (2 b^2 C \sec ^2(c+d x)+2 a (2 b B+a C)\right )dx+x \left (a^2 B+4 a b C+2 b^2 B\right )\right )+\frac {a^2 B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\int \frac {2 b^2 C \csc \left (c+d x+\frac {\pi }{2}\right )^2+2 a (2 b B+a C)}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+x \left (a^2 B+4 a b C+2 b^2 B\right )\right )+\frac {a^2 B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 4533 |
\(\displaystyle \frac {1}{2} \left (2 b^2 C \int \sec (c+d x)dx+x \left (a^2 B+4 a b C+2 b^2 B\right )+\frac {2 a (a C+2 b B) \sin (c+d x)}{d}\right )+\frac {a^2 B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (2 b^2 C \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+x \left (a^2 B+4 a b C+2 b^2 B\right )+\frac {2 a (a C+2 b B) \sin (c+d x)}{d}\right )+\frac {a^2 B \sin (c+d x) \cos (c+d x)}{2 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{2} \left (x \left (a^2 B+4 a b C+2 b^2 B\right )+\frac {2 a (a C+2 b B) \sin (c+d x)}{d}+\frac {2 b^2 C \text {arctanh}(\sin (c+d x))}{d}\right )+\frac {a^2 B \sin (c+d x) \cos (c+d x)}{2 d}\) |
(a^2*B*Cos[c + d*x]*Sin[c + d*x])/(2*d) + ((a^2*B + 2*b^2*B + 4*a*b*C)*x + (2*b^2*C*ArcTanh[Sin[c + d*x]])/d + (2*a*(2*b*B + a*C)*Sin[c + d*x])/d)/2
3.8.80.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^2*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[a^2*A*Cos[ e + f*x]*((d*Csc[e + f*x])^(n + 1)/(d*f*n)), x] + Simp[1/(d*n) Int[(d*Csc [e + f*x])^(n + 1)*(a*(2*A*b + a*B)*n + (2*a*b*B*n + A*(b^2*n + a^2*(n + 1) ))*Csc[e + f*x] + b^2*B*n*Csc[e + f*x]^2), x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && LeQ[n, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*m)), x] + Simp[(C*m + A*(m + 1))/(b^2*m) Int[(b*Csc[e + f*x])^(m + 2), x], x] /; Fr eeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_. )*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.) *(x_)]*(d_.))^(n_.), x_Symbol] :> Simp[1/b^2 Int[(a + b*Csc[e + f*x])^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Time = 0.26 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.18
method | result | size |
derivativedivides | \(\frac {B \,a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{2} \sin \left (d x +c \right )+2 B a b \sin \left (d x +c \right )+2 C a b \left (d x +c \right )+B \,b^{2} \left (d x +c \right )+C \,b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(94\) |
default | \(\frac {B \,a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{2} \sin \left (d x +c \right )+2 B a b \sin \left (d x +c \right )+2 C a b \left (d x +c \right )+B \,b^{2} \left (d x +c \right )+C \,b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(94\) |
parallelrisch | \(\frac {-4 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{2}+4 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{2}+B \,a^{2} \sin \left (2 d x +2 c \right )+\left (8 B a b +4 C \,a^{2}\right ) \sin \left (d x +c \right )+2 \left (B \,a^{2}+2 B \,b^{2}+4 C a b \right ) x d}{4 d}\) | \(97\) |
risch | \(\frac {a^{2} B x}{2}+x B \,b^{2}+2 x C a b -\frac {i {\mathrm e}^{i \left (d x +c \right )} B a b}{d}-\frac {i {\mathrm e}^{i \left (d x +c \right )} C \,a^{2}}{2 d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} B a b}{d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} C \,a^{2}}{2 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C \,b^{2}}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C \,b^{2}}{d}+\frac {B \,a^{2} \sin \left (2 d x +2 c \right )}{4 d}\) | \(156\) |
norman | \(\frac {\left (-\frac {1}{2} B \,a^{2}-B \,b^{2}-2 C a b \right ) x +\left (-\frac {3}{2} B \,a^{2}-3 B \,b^{2}-6 C a b \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (\frac {1}{2} B \,a^{2}+B \,b^{2}+2 C a b \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (\frac {3}{2} B \,a^{2}+3 B \,b^{2}+6 C a b \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\frac {a \left (3 a B -4 B b -2 C a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}+\frac {a \left (3 a B +4 B b +2 C a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {2 a \left (a B -4 B b -2 C a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {a \left (a B -4 B b -2 C a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}-\frac {a \left (a B +4 B b +2 C a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a \left (a B +4 B b +2 C a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}+\frac {C \,b^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {C \,b^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(359\) |
1/d*(B*a^2*(1/2*sin(d*x+c)*cos(d*x+c)+1/2*d*x+1/2*c)+C*a^2*sin(d*x+c)+2*B* a*b*sin(d*x+c)+2*C*a*b*(d*x+c)+B*b^2*(d*x+c)+C*b^2*ln(sec(d*x+c)+tan(d*x+c )))
Time = 0.28 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.09 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {C b^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - C b^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (B a^{2} + 4 \, C a b + 2 \, B b^{2}\right )} d x + {\left (B a^{2} \cos \left (d x + c\right ) + 2 \, C a^{2} + 4 \, B a b\right )} \sin \left (d x + c\right )}{2 \, d} \]
integrate(cos(d*x+c)^3*(a+b*sec(d*x+c))^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")
1/2*(C*b^2*log(sin(d*x + c) + 1) - C*b^2*log(-sin(d*x + c) + 1) + (B*a^2 + 4*C*a*b + 2*B*b^2)*d*x + (B*a^2*cos(d*x + c) + 2*C*a^2 + 4*B*a*b)*sin(d*x + c))/d
\[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (B + C \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{2} \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx \]
Time = 0.26 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.24 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} + 8 \, {\left (d x + c\right )} C a b + 4 \, {\left (d x + c\right )} B b^{2} + 2 \, C b^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, C a^{2} \sin \left (d x + c\right ) + 8 \, B a b \sin \left (d x + c\right )}{4 \, d} \]
integrate(cos(d*x+c)^3*(a+b*sec(d*x+c))^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")
1/4*((2*d*x + 2*c + sin(2*d*x + 2*c))*B*a^2 + 8*(d*x + c)*C*a*b + 4*(d*x + c)*B*b^2 + 2*C*b^2*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 4*C* a^2*sin(d*x + c) + 8*B*a*b*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 178 vs. \(2 (76) = 152\).
Time = 0.33 (sec) , antiderivative size = 178, normalized size of antiderivative = 2.22 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, C b^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, C b^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (B a^{2} + 4 \, C a b + 2 \, B b^{2}\right )} {\left (d x + c\right )} - \frac {2 \, {\left (B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
1/2*(2*C*b^2*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 2*C*b^2*log(abs(tan(1/2* d*x + 1/2*c) - 1)) + (B*a^2 + 4*C*a*b + 2*B*b^2)*(d*x + c) - 2*(B*a^2*tan( 1/2*d*x + 1/2*c)^3 - 2*C*a^2*tan(1/2*d*x + 1/2*c)^3 - 4*B*a*b*tan(1/2*d*x + 1/2*c)^3 - B*a^2*tan(1/2*d*x + 1/2*c) - 2*C*a^2*tan(1/2*d*x + 1/2*c) - 4 *B*a*b*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^2)/d
Time = 17.81 (sec) , antiderivative size = 169, normalized size of antiderivative = 2.11 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {C\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {B\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,b^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {B\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {2\,B\,a\,b\,\sin \left (c+d\,x\right )}{d}+\frac {4\,C\,a\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]
(C*a^2*sin(c + d*x))/d + (B*a^2*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2) ))/d + (2*B*b^2*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (2*C*b^2* atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (B*a^2*sin(2*c + 2*d*x)) /(4*d) + (2*B*a*b*sin(c + d*x))/d + (4*C*a*b*atan(sin(c/2 + (d*x)/2)/cos(c /2 + (d*x)/2)))/d